(function(){
    function User(name, iconPath){
        this.name = name
        this.winCount = 0;
        this.loseCount = 0;
        // this.iconPath = iconPath;
    }

    User.prototype.win = function(){
        this.winCount += 1;
    }

    User.prototype.lose = function(){
        this.loseCount += 1;
    }

    User.prototype.render = function(doc){
        let node = `<span>${this.name}</span>
        <span>赢 : ${this.winCount}</span>
        <span>输 : ${this.loseCount}</span>`;
        doc.innerHTML = node;
    };

    window.User = User;

})();